using System;
using System.Collections.Generic;
using System.Text;

namespace Colman.Rpg.Messaging
{
    /// <summary>
    /// Represnts a response from the server to a <see cref="EnterShopRequest"/>.
    /// </summary>
    [Serializable]
    public class EnterShopResponse : ResponseMessage
    {
        /// <summary>
        /// Creates a new instance of <see cref="EnterShopResponse" />.
        /// </summary>
        /// <param name="items">The shop's stock.</param>
        /// <param name="player">The player's object, including their stock.</param>
        [System.Diagnostics.DebuggerStepThrough]
        public EnterShopResponse(IEnumerable<Item> items, Player player)
            : base(ResponseDestination.Requester)
        {
            this.items = new List<Item>(items);
            this.player = player;
        }

        #region List<Item> Items { get; } (items)
        private List<Item> items;

        /// <summary>
        /// Gets or sets the list of items available in the shop.
        /// </summary>
        public List<Item> Items
        {
            [System.Diagnostics.DebuggerStepThrough]
            get
            {
                return this.items;
            }
        }
        #endregion

        #region Player Player { get; } (player)
        private Player player;

        /// <summary>
        /// Gets the player that has entered the shop.
        /// </summary>
        [System.ComponentModel.Description("Indicates the player that has entered the shop.")]
        public Player Player
        {
            [System.Diagnostics.DebuggerStepThrough]
            get
            {
                return this.player;
            }
        }
        #endregion
    }
}
